#include <ximera/gui/cegui/textbox.hpp>

namespace ximera { namespace gui { namespace cegui
{
    UInt32 Textbox::maxLength() const
    {
        return UInt32(ceguiEditbox()->getMaxTextLength());
    }

    void Textbox::maxLength(UInt32 value)
    {
        ceguiEditbox()->setMaxTextLength(value);
    }

    bool Textbox::readOnly() const
    {
        return ceguiEditbox()->isReadOnly();
    }

    void Textbox::readOnly(bool value)
    {
        ceguiEditbox()->setReadOnly(value);
    }

    bool Textbox::useMask() const
    {
        return ceguiEditbox()->isTextMasked();
    }

    void Textbox::useMask(bool value)
    {
        ceguiEditbox()->setTextMasked(value);
    }

    Char Textbox::maskChar() const
    {
        return ceguiEditbox()->getMaskCodePoint();
    }

    void Textbox::maskChar(Char c)
    {
        ceguiEditbox()->setMaskCodePoint(c);
    }
}}}